var e, t = (e = require("@vant/weapp/toast/toast")) && e.__esModule ? e : {
    default: e
};

var o = require("../../utils/request"), a = require("../../utils/api");

Page({
    data: {
        activeName: "",
        show: !1,
        eInvoiceRecord: [],
        currentEInvoiceRecord: {}
    },
    onLoad: function() {},
    onShow: function() {
        this.getEInvoiceRecord();
    },
    onChange: function(e) {
        this.setData({
            activeName: e.detail
        });
    },
    showPopup: function(e) {
        this.setData({
            currentEInvoiceRecord: e.currentTarget.dataset.einvoiceitem,
            show: !0
        });
    },
    closePopup: function() {
        this.setData({
            show: !1
        });
    },
    getEInvoiceRecord: function() {
        var e = this;
        o.request(o.HttpMethod.GET, a.apiRoute.getEInvoiceRecordByJwt, {}).then(function(o) {
            "20000" == o.code ? e.setData({
                eInvoiceRecord: o.data
            }) : (0, t.default)({
                message: o.message,
                duration: 5e3
            });
        });
    }
});